#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import accuseinfo_blueprint
from api_1_0.accuseInfoResource.accuseInfoResource import AccuseInfoResource
from api_1_0.accuseInfoResource.accuseInfoOtherResource import AccuseInfoOtherResource

api = Api(accuseinfo_blueprint)

api.add_resource(AccuseInfoResource, '/accuseInfo/<AutoID>', '/accuseInfo', endpoint='accuseInfo')


# joint query
@accuseinfo_blueprint.route('/accuseInfo/query', methods=['GET'], endpoint='accuseInfo_query')
def AccuseInfo_query():
    return AccuseInfoOtherResource.joint_query()

# API 垂直越权(存在缺陷)
@accuseinfo_blueprint.route('/accuseInfo/getaccuseinfov1', methods=['GET'], endpoint='accuseInfo_getaccuseinfov1')
def AccuseInfo_getaccuseinfo():
    return AccuseInfoOtherResource.getaccuseinfoV1()
#API 垂直越权(解决)
# @accuseinfo_blueprint.route('/accuseInfo/getaccuseinfov2', methods=['GET'], endpoint='accuseInfo_getaccuseinfov2')
# def AccuseInfo_getaccuseinfo():
#     return AccuseInfoOtherResource.getaccuseinfoV2()

